#ifndef DIALOGLASERTEST_H
#define DIALOGLASERTEST_H

#include <QDialog>

namespace Ui {
class DialogLaserTest;
}

class QTimer;

enum RTC5TESTTYPE
{
    RTC5TESTTYPE_LENS,
    RTC5TESTTYPE_CALIBRATION,
    RTC5TESTTYPE_GOTO,
    RTC5TESTTYPE_ONTIME,
    RTC5TESTTYPE_LINE,
    RTC5TESTTYPE_CIRCLE,
    RTC5TESTTYPE_RECTANGLE,
    RTC5TESTTYPE_SLICE
};

class DialogLaserTest : public QDialog
{
    Q_OBJECT

public:
    explicit DialogLaserTest(QWidget *parent = nullptr);
    ~DialogLaserTest();

    void initParas();
    void timeCountdown(int time);    

private slots:    
    void on_countDownTime();

    void on_radioButton_laserEnable_clicked(bool checked);

    void on_radioButton_lensTest_clicked(bool checked);

    void on_radioButton_gotoTest_clicked(bool checked);

    void on_radioButton_OntimeLighting_clicked(bool checked);

    void on_radioButton_Line_clicked(bool checked);

    void on_radioButton_circle_clicked(bool checked);

    void on_radioButton_Rectangle_clicked(bool checked);

    void on_radioButton_slice_clicked(bool checked);

    void on_pushButton_startTest_clicked();

    void on_pushButton_stopTest_clicked();

    void on_pushButton_saveParas_clicked();

    void on_pushButton_resetParas_clicked();

    void on_radioButton_redLightEnable_clicked(bool checked);

    void on_radioButton_safeCheck_clicked(bool checked);

    void on_pushButton_openCaliFile_clicked();

    void on_pushButton_applyCaliFile_clicked();

    void on_radioButton_calibrationTest_clicked(bool checked);

    void on_radioButton_skyWritingOn_clicked(bool checked);

private:
    Ui::DialogLaserTest *ui;
    RTC5TESTTYPE rtc5TestType{RTC5TESTTYPE_LENS};
    bool safeCheck{true};
    QTimer *countDownTimer_;
    int countDownTime{0};
};

#endif // DIALOGLASERTEST_H
